]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
modalDialog: Consistently return correct boolean for open() in ModalDialogs
authorEvan Welsh <contact@evanwelsh.com>
Sat, 30 Oct 2021 22:08:12 +0000 (15:08 -0700)
committerMarge Bot <marge-bot@gnome.org>
Wed, 17 Nov 2021 10:24:47 +0000 (10:24 +0000)
Previously these calls either ignored the return from super.open() or
implicitely returned false.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2038>

js/ui/accessDialog.js
js/ui/runDialog.js
js/ui/welcomeDialog.js

index 057cd5b1bb7bc161e222428d1c03527649508e73..7c8d69b806a49a513f16b22a6bbf3519d97c5392 100644 (file)
@@ -76,10 +76,12 @@ class AccessDialog extends ModalDialog.ModalDialog {
     }
 
     open() {
-        super.open();
+        if (!super.open())
+            return false;
 
         let connection = this._invocation.get_connection();
         this._requestExported = this._request.export(connection, this._handle);
+        return true;
     }
 
     CloseAsync(invocation, _params) {
index cf835972ea440b0b86cba85c0538bb16fb02aae6..4d1bac142a1e62960c8423577291140831397605 100644 (file)
@@ -249,8 +249,8 @@ class RunDialog extends ModalDialog.ModalDialog {
         this._commandError = false;
 
         if (this._lockdownSettings.get_boolean(DISABLE_COMMAND_LINE_KEY))
-            return;
+            return false;
 
-        super.open();
+        return super.open();
     }
 });
index 9d99f0035f374f93c4edf747963e3d8ae8cb17c4..fd38fd262951ec11f12d9dc068e2e40506966175 100644 (file)
@@ -26,9 +26,9 @@ class WelcomeDialog extends ModalDialog.ModalDialog {
 
     open() {
         if (!this._tourAppInfo)
-            return;
+            return false;
 
-        super.open();
+        return super.open();
     }
 
     _buildLayout() {